package model.macro 
{
	/**
	 * 
	 */
	public class FortressType 
	{
		static public var OUTPOST:FortressType = new FortressType("Outpost", 1000, 1, 50, 300);
		static public var CASTLE:FortressType = new FortressType("Castle", 20000, 5, 300, 1000);
		static public var CITADEL:FortressType = new FortressType("Citadel", 50000, 7, 600, 2500);
		
		/**The max number of hitpoints without upgrades.*/
		private var _baseHp:int;
		private var _baseArmor:Number;
		private var _archerSlots:int;
		private var _garrisonSlots:int;
		private var _requiredTechs:Vector.<Tech>;
		private var _requiredBuildings:Vector.<Building>;
		private var _cost:int;
		private var _name:String;
		
		/**
		 * Create a new fortress type.
		 * @param	base_hp			Hitpoints without upgrades
		 * @param	base_armor		Armor value without upgrades
		 * @param	archer_slots	Maximum number of shooting archers
		 * @param	garrison_slots	Maximum number of protected troops
		 */
		public function FortressType(name:String, base_hp:int, base_armor:Number, archer_slots:int, garrison_slots:int, required_techs:Vector.<Tech> = null, required_buildings:Vector.<Building> = null, cost:int = 0) 
		{
			_name = name;
			_baseHp = base_hp;
			_baseArmor = base_armor;
			_archerSlots = archer_slots;
			_garrisonSlots = garrison_slots;
			_requiredTechs = required_techs;
			_requiredBuildings = required_buildings;
			_cost = cost;
		}
		
		/**
		 * @return	List of possible upgrades.
		 */
		public function getPossibleUpgrades():Vector.<FortressUpgrade>
		{
			return null;
		}
		
		public function get baseHp():int 
		{
			return _baseHp;
		}
		
		public function set baseHp(value:int):void 
		{
			_baseHp = value;
		}
		
		public function get baseArmor():Number 
		{
			return _baseArmor;
		}
		
		public function set baseArmor(value:Number):void 
		{
			_baseArmor = value;
		}
		
		public function get archerSlots():int 
		{
			return _archerSlots;
		}
		
		public function set archerSlots(value:int):void 
		{
			_archerSlots = value;
		}
		
		public function get garrisonSlots():int 
		{
			return _garrisonSlots;
		}
		
		public function set garrisonSlots(value:int):void 
		{
			_garrisonSlots = value;
		}
		
		public function get requiredTechs():Vector.<Tech> 
		{
			return _requiredTechs;
		}
		
		public function get requiredBuildings():Vector.<Building> 
		{
			return _requiredBuildings;
		}
		
		public function get cost():int 
		{
			return _cost;
		}
		
		public function get name():String 
		{
			return _name;
		}
	}

}